﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Canteen.Core.Models.Migrations
{
    public partial class NoLen20 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "OrderNo",
                table: "ShopOrders",
                type: "VARCHAR(20)",
                maxLength: 32,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "VARCHAR(12)",
                oldMaxLength: 32);

            migrationBuilder.AlterColumn<string>(
                name: "RechargeNo",
                table: "RechargeRecords",
                type: "VARCHAR(20)",
                maxLength: 32,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "VARCHAR(12)",
                oldMaxLength: 32);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "OrderNo",
                table: "ShopOrders",
                type: "VARCHAR(12)",
                maxLength: 32,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "VARCHAR(20)",
                oldMaxLength: 32);

            migrationBuilder.AlterColumn<string>(
                name: "RechargeNo",
                table: "RechargeRecords",
                type: "VARCHAR(12)",
                maxLength: 32,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "VARCHAR(20)",
                oldMaxLength: 32);
        }
    }
}
